<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<link href='http://fonts.googleapis.com/css?family=Donegal+One' rel='stylesheet' type='text/css'>
		<title>小双快拼--在线的双拼输入教学系统</title>
		<meta name="viewport" content="width=1280, user-scalable=no"/>  
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
		<script src="./jquery.min.js" type="text/javascript"></script>
		<link rel="stylesheet" href="style.css" />
	</head>
	<script type="text/javascript">
		$(document).ready(function(){
			$("#handler-login").click(function(){
				$("#login").show();
				$("#sign-up").hide();
			});
			$("#handler-sign-up").click(function(){
				$("#sign-up").show();
				$("#login").hide();
			});
		});

		function check()
		{
			if (document.form1.email.value=="")
			{
				alert("注册邮箱不能为空!");
				return false; 
			}
			if (document.form1.	nick_name.value=="")
			{
				alert("昵称不能为空!");
				return false; 
			}
			if (document.form1.	password.value=="")
			{
				alert("密码不能为空!");
				return false; 
			}
			if (document.form1.confirm.value=="")
			{
				alert("确认密码不能为空!");
				return false; 
			}
			if (document.form1.password.value!=document.form1.confirm.value)
			{
				alert("密码不一致!");
				return false; 
			}
			return true;
		}
	</script>


	<body>
        <div id="container">
                <div id="slide">
                    <img src="logo.gif" width="100%"/>
                </div>
                <div id="enter">
                    <div id="login">
                        <form class="login" action="login.php" method="post">
                            <h2>登录</h2>
                            <input type="text" class="text-field" name="email" placeholder="用户名"/>
                            <input type="password" class="text-field" name="password" placeholder="密码"/>
                            <div id="handler-sign-up">
                                <p class="fake_link">还没有帐号？</p>
                            </div>
                            <input type="submit" class="button long" value="登录" />
                        </form>
                    </div>
                
                    <div id="sign-up">
                        <form name="form1" class="register" action="register.php" method="post" onsubmit="return check()" >
                            <h2>注册</h2>
                            <input type="text" name="email" placeholder="用户名" class="text-field" >
                            <input type="text" name="nick_name" class="text-field" placeholder="昵称"/>
                            <input type="password" name="password" class="text-field" placeholder="密码"/>
                            <input type="password" name="confirm" class="text-field" placeholder="密码确认"/><br/><br/>
                            <div id="handler-login">
                                <p class="fake_link">已经有帐号啦？</p>
                            </div>
                            <input type="submit" class="button short" value="注册" />
                            <input type="reset" class="button short" value="重置" />

                        </form>
                    </div>
                </div>
        </div>
	</body>
</html>
